package com.hsteach.web.controller.buildingApply.vo;

import com.hsteach.framework.feign.client.xgk.dto.ret.ClazzVo;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@ApiModel(value = "ListRoomsVo", description = "场所列表")
@Data
public class ListRoomsVo implements Serializable {

    //建筑 id
    private String buildingId;

    private String buildingName;

    //楼层 id
    private String floorId;

    //楼层名
    private String floorName;

    //校区 id
    private String campusId;

    //房间编码
    private String roomCode;

    //房间编码前缀
    private String roomCodePrefix;

    //房间 id
    private String classroomId;

    //房间名称
    private String classroomName;

    //用途
    private String useId;

    //面积
    private Integer area;

    //容量
    private Integer capacity;

    //场所关联的班级
    private List<ClazzVo>  clazzVoList;

    //使用情况
    private String serviceCondition;

    private List<ListHoldingTimeVo> holdTime;
    // 将 roomCode 的数字部分转换为 Integer
    public Integer getRoomCodeAsInt() {
        String digitsOnly = roomCode.replaceAll("[^0-9]", "");
        return Integer.parseInt(digitsOnly);
    }

}
